﻿<%@ Page PathInChannel="play.aspx" RunAt="Execute" %>
<%@ OutputCache Duration="86400" VaryByParam="ID" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<ali:Get ID="Player16" Mark="System" Object="Player" InnerID="16" />
<ali:Get ID="Player21" Mark="System" Object="Player" InnerID="21" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<%=MetaKeywords%>" />
<meta name="description" content="<%=MetaDescription%>" />
<title>连续播放 - <%=Channel[Name]%> - <%=Site[Name]%></title>
<link rel="stylesheet" type="text/css" href="<%=CommonPath%>jquery/themes/lightness/all.css" />
<ali:Comment><link rel="stylesheet" type="text/css" href="S01/CHS/css/common.css" /></ali:Comment>
<link rel="stylesheet" type="text/css" href="<%=CssPath%>common.css" />
<ali:Comment><link rel="stylesheet" type="text/css" href="S01/CHS/css/player.css" /></ali:Comment>
<link rel="stylesheet" type="text/css" href="<%=CssPath%>player.css" />
<script language="c#" runat="server">
protected string Condition()
{
	StringBuilder result = new StringBuilder();
	
	string[] ids = Request.QueryString["ID"].Split('|');
	foreach (string id in ids)
	{
		if (result.Length == 0)
			result.Append(AliCMS.MusicModule.Alias.Music.InnerID + "=" + id);
		else
			result.Append(" or " + AliCMS.MusicModule.Alias.Music.InnerID + "=" + id);
	}
	return result.ToString();
}

protected string GetPlayerInnerID(DataRow record)
{
	return Guid.Equals(record[Alias.Music.PlayerID], new Guid("52757E5B-CE5F-4240-B168-908CC2A84676")) ? "16" : "21";
}

protected string GetUrl(string type, DataRow record)
{
	switch (type)
	{
		case "Region":
			if (Guid.Equals(record[Alias.Music.RegionID], Guid.Empty))
				return "";
			else
				return BuildUrl(Channel, "music_region", "PageTemplate=" + record[Alias.Music.RegionPageTemplate] + "&ID=" + record[Alias.Music.RegionPageID] + "&Ext=" + record[Alias.Music.RegionPageExtension]);
		case "Language":
			if (Guid.Equals(record[Alias.Music.LanguageID], Guid.Empty))
				return "";
			else
				return BuildUrl(Channel, "music_language", "PageTemplate=" + record[Alias.Music.LanguagePageTemplate] + "&ID=" + record[Alias.Music.LanguagePageID] + "&Ext=" + record[Alias.Music.LanguagePageExtension]);
		case "Category":
			if (Guid.Equals(record[Alias.Music.CategoryID], Guid.Empty))
				return "";
			else
				return BuildUrl(Channel, "music_category", "PageTemplate=" + record[Alias.Music.CategoryPageTemplate] + "&ID=" + record[Alias.Music.CategoryPageID] + "&Ext=" + record[Alias.Music.CategoryPageExtension]);
		case "Tag":
		{
			if (Convert.IsDBNull(record[Alias.Music.TagPageIDs]))
				return "";

			string[] tagPageIDs = record[Alias.Music.TagPageIDs].ToString().Split('|');
			string[] tagPageExtensions = record[Alias.Music.TagPageExtensions].ToString().Split('|');
			string[] tagPageTemplates = record[Alias.Music.TagPageTemplates].ToString().Split('|');

			string result = null;
			for (int i = 0; i < tagPageIDs.Length; i++)
			{
				if (tagPageIDs[i] == "")
					continue;

				if (result == null)
					result = "|";

				result += BuildUrl(Channel, "music_tag", "PageTemplate=" + tagPageTemplates[i] + "&ID=" + tagPageIDs[i] + "&Ext=" + tagPageExtensions[i]) + "|";
			}
			
			return result;
		}
		case "Person":
		{
			if (Convert.IsDBNull(record[Alias.Music.PersonPageIDs]))
				return "";

			string[] personPageIDs = record[Alias.Music.PersonPageIDs].ToString().Split(new char[] { '|' });
			string[] personPageExtensions = record[Alias.Music.PersonPageExtensions].ToString().Split(new char[] { '|' });
			string[] personPageTemplates = record[Alias.Music.PersonPageTemplates].ToString().Split(new char[] { '|' });

			string result = null;
			for (int i = 0; i < personPageIDs.Length; i++)
			{
				if (personPageIDs[i] == "")
					continue;

				if (result == null)
					result = "|";

				result += BuildUrl(Channel, "person", "PageTemplate=" + personPageTemplates[i] + "&ID=" + personPageIDs[i] + "&Ext=" + personPageExtensions[i]) + "|";
			}
			
			return result;
		}
		case "Album":
		{
			if (Convert.IsDBNull(record[Alias.Music.AlbumPageIDs]))
				return "";

			string[] albumPageIDs = record[Alias.Music.AlbumPageIDs].ToString().Split(new char[] { '|' });
			string[] albumPageExtensions = record[Alias.Music.AlbumPageExtensions].ToString().Split(new char[] { '|' });
			string[] albumPageTemplates = record[Alias.Music.AlbumPageTemplates].ToString().Split(new char[] { '|' });

			string result = null;
			for (int i = 0; i < albumPageIDs.Length; i++)
			{
				if (albumPageIDs[i] == "")
					continue;
				
				if (result == null)
					result = "|";

				result += BuildUrl(Channel, "album", "PageTemplate=" + albumPageTemplates[i] + "&ID=" + albumPageIDs[i] + "&Ext=" + albumPageExtensions[i]) + "|";
			}
			
			return result;
		}
	}
	
	return "";
}
</script>
<script type="text/javascript">
var _page = "play";
var _webPath = "<%=WebPath%>";
var _lang = "<%=PageLang%>";
var _lang_content_empty = "请输入内容！";
var _lang_operation_success = "操作成功！";
var _lang_operation_fail = "操作失败！";
var _lang_no_download = "此歌曲没有提供下载！";
</script>
</head>
<body>
<!-- TemplateBeginEditable name="菜单" -->
<div class="Wrap">
	<ali:Menu Condition="IsDisplay=true and CategoryID IS NULL and ParentID IS NULL">
		<div class="Menu">
			<ali:Record>
				<ali:Select>
					<ali:Yes>
						<a href="<%=URL%>" target="<%=Target%>" title="<%=Name%>"<%=Style%>><strong><%=Name%></strong></a>
					</ali:Yes>
					<ali:No>
						<a href="<%=URL%>" target="<%=Target%>" title="<%=Name%>"<%=Style%>><%=Name%></a>
					</ali:No>
				</ali:Select>
				<ali:Separator>|</ali:Separator>
			</ali:Record>
		</div>
	</ali:Menu>
</div>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="广告位：音乐 - Banner" -->
<div class="Wrap">
	<div class="Ad1">
		<ali:Ad Guid="{6BF4CF33-6A59-47bf-958D-F7A1E6F4566C}">
			<a href="http://www.alibaza.com" target="_blank"><img src="<%=ImagePath%>ad/ad1.jpg" alt="Ad" style="width:980px;height:100px" /></a>
		</ali:Ad>
	</div>
</div>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="专辑类别" -->
<ali:List Object="AlbumCategory" Condition="IsDisplay=true and ParentID IS NULL">
	<div class="Wrap">
		<ul class="SubMenu">
			<ali:Record>
				<li class="Left"></li>
				<li class="Middle"><a href="<%=BuildUrl()%>" title="<%=Name%>"<%=Style%>><%=Name%></a></li>
				<li class="Right"></li>
			</ali:Record>
		</ul>
	</div>
</ali:List>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="搜索" -->
<div class="Wrap">
	<div class="Search">
		<form id="Search" action="" target="_blank">
			<input type="radio" name="Search" id="MusicSearch" value="<%=BuildUrl("music_search")%>" checked="checked" /><label for="MusicSearch">歌曲</label>
			<input type="radio" name="Search" id="AlbumSearch" value="<%=BuildUrl("album_search")%>" /><label for="AlbumSearch">专辑</label>
			<input type="radio" name="Search" id="PersonSearch" value="<%=BuildUrl("person_search")%>" /><label for="PersonSearch">人物</label>
			<input type="radio" name="Search" id="LyricSearch" value="<%=BuildUrl("lyric_search")%>" /><label for="LyricSearch">歌词</label>
			<input type="text" name="q" size="40" class="Text <%=PageLang%>Font" />
			<input type="submit" value="搜 索" class="Submit" />
		</form>
	</div>
</div>
<!-- TemplateEndEditable -->

<div class="Wrap">
	<!-- TemplateBeginEditable name="广告位：音乐 - 搜索下方 - 左" -->
	<div class="Ad6">
		<ali:Ad Guid="{8D3891CF-0502-466f-9C98-5C1CE722383E}">
			<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad4.gif" alt="Ad" style="width:250px;height:60px" /></a>
		</ali:Ad>
	</div>
	<!-- TemplateEndEditable -->
	<!-- TemplateBeginEditable name="广告位：音乐 - 搜索下方 - 中" -->
	<div class="Ad6">
		<ali:Ad Guid="{BA65F593-5900-45da-9A25-584208877F9E}">
			<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad7.gif" alt="Ad" style="width:480px;height:60px" /></a>
		</ali:Ad>
	</div>
	<!-- TemplateEndEditable -->
	<!-- TemplateBeginEditable name="广告位：音乐 - 搜索下方 - 右" -->
	<div class="Ad6">
		<ali:Ad Guid="{BCDE2EB2-C02C-416f-AB34-CDFC4008641B}">
			<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad8.gif" alt="Ad" style="width:250px;height:60px" /></a>
		</ali:Ad>
	</div>
	<!-- TemplateEndEditable -->
</div>

<!-- TemplateBeginEditable name="路径" -->
<div class="Wrap">
	<div class="Path">当前位置：
		<ali:Path IncludeCurrentChannel="True">
			<ali:Record>
				<a href="<%=URL%>" title="<%=Name%>"><%=Name%></a> &gt; 
			</ali:Record>
		</ali:Path>
		<a href="<%=BuildUrl("music_list")%>" title="音乐列表">音乐列表</a> &gt; 连续播放
	</div>
</div>
<!-- TemplateEndEditable -->

<div class="Wrap">
	<div class="Block6">
		<div id="Player">
			<h5>字幕<img id="MinMaxTitle" src="<%=ImagePath%>player/min.gif" alt="最小化/最大化字幕窗口" title="最小化/最大化字幕窗口" /><img id="CloseTitle" src="<%=ImagePath%>player/close.gif" alt="关闭字幕窗口" title="关闭字幕窗口" /></h5>
			<div id="Title">
				<ul id="lrcoll">
					<li id="lrcwt1"></li>
					<li id="lrcwt2"></li>
					<li id="lrcwt3"></li>
					<li><span id="lrcbc"></span></li>
					<li id="lrcwt4"></li>
					<li id="lrcwt5"></li>
				</ul>
			</div>
			<div id="Control">
				<div id="Time">00:00 | 00:00</div>
				<img id="Wave" src="<%=ImagePath%>player/wave_off.gif" alt="波形" />
				<div id="ScrollingInfo"></div>
				<img id="Random" src="<%=ImagePath%>player/random_off.gif" alt="播放顺序" title="播放顺序" />
				<img id="Repeat" src="<%=ImagePath%>player/repeat_off.gif" alt="切换是否重复播放目前曲目" title="切换是否重复播放目前曲目" />
				<div id="TimeLine"><img id="TimeBar" src="<%=ImagePath%>player/timebar.gif" alt="" /></div>
				<img id="Logo" src="<%=ImagePath%>player/logo.gif" alt="Logo" />
				<img id="Prev" src="<%=ImagePath%>player/prev.gif" alt="上一曲" title="上一曲" />
				<img id="Play" src="<%=ImagePath%>player/play.gif" alt="播放" title="播放" />
				<img id="Pause" src="<%=ImagePath%>player/pause.gif" alt="暂停" title="暂停" />
				<img id="Stop" src="<%=ImagePath%>player/stop.gif" alt="停止" title="停止" />
				<img id="Next" src="<%=ImagePath%>player/next.gif" alt="下一曲" title="下一曲" />
				<img id="Mute" src="<%=ImagePath%>player/mute_off.gif" alt="静音模式" title="静音模式" />
				<div id="VolumeLine"><img id="VolumeBar" src="<%=ImagePath%>player/bar.gif" alt="控制音量" title="控制音量" /></div>
				<div id="TrackLine"><img id="TrackBar" src="<%=ImagePath%>player/bar.gif" alt="控制左右声道" title="控制左右声道" /></div>
			</div>
			<h5>播放列表<img id="MinMaxPlayList" src="<%=ImagePath%>player/min.gif" alt="最小化/最大化播放列表窗口" title="最小化/最大化播放列表窗口" /><img id="ClosePlayList" src="<%=ImagePath%>player/close.gif" alt="关闭播放列表窗口" title="关闭播放列表窗口" /></h5>
			<ul id="PlayList">
				<ali:List Object="Music" Condition="Condition()">
					<ali:Record>
						<li InnerID="<%=InnerID%>" Guid="<%=ID%>" Name="<%=Name%>" PlayerID="<%=GetPlayerInnerID(Record)%>" Url="<%=URL%>" Download="<%=Download%>" HitCount="<%=HitCount%>" Up="<%=Up%>" Down="<%=Down%>" RegionName="<%=RegionName%>" RegionUrl="<%=GetUrl("Region", Record)%>" LanguageName="<%=LanguageName%>" LanguageUrl="<%=GetUrl("Language", Record)%>" CategoryName="<%=CategoryName%>" CategoryUrl="<%=GetUrl("Category", Record)%>" TagNames="<%=TagNames%>" TagUrls="<%=GetUrl("Tag", Record)%>" PersonNames="<%=PersonNames%>" PersonUrls="<%=GetUrl("Person", Record)%>" AlbumNames="<%=AlbumNames%>" AlbumUrls="<%=GetUrl("Album", Record)%>" Lyric="<%=HttpUtility.HtmlAttributeEncode(Convert.ToString(Lyric))%>" Lrc="<%=HttpUtility.HtmlAttributeEncode(Convert.ToString(Title))%>">
							<span>
								<%If Convert.ToString(Download) != ""%>
									<img src="<%=ImagePath%>download.gif" alt="下载" title="下载" />
								<%EndIf%>
								<img src="<%=ImagePath%>up.gif" alt="顶" title="顶" /><img src="<%=ImagePath%>down.gif" alt="踩" title="踩" /><img src="<%=ImagePath%>report.gif" alt="报告错误" title="报告错误" />
							</span>
							<input type="checkbox" checked="checked" /><%=Index%>. <a href=""><%=Name%> - <%=PersonNames%></a>
						</li>
					</ali:Record>
				</ali:List>
			</ul>
		</div>
		<div class="Block15">
			<h5></h5>
			<p>
				<label>播放：</label> <span id="HitCount"></span>
				<img src="<%=ImagePath%>up_arrow.gif" alt="Up" /> <span id="Up"></span>
				<img src="<%=ImagePath%>down_arrow.gif" alt="Down" /> <span id="Down"></span>
				<br />
				<label>类别：</label> <span id="Category"></span><br />
				<label>地区：</label> <span id="Region"></span><br />
				<label>语言：</label> <span id="Language"></span><br />
				<label>标签：</label> <span id="Tag"></span><br />
				<label>人物：</label> <span id="Person"></span><br />
				<label>专辑：</label> <span id="Album"></span><br />
			</p>
			<div class="Block10">
				<p><a href="">添加歌词</a> <a href="">修正歌词</a></p>
				<p><a href="">添加字幕</a> <a href="">修正字幕</a></p>
			</div>
			<pre></pre>
			<form action="">
				<textarea name="Content" cols="50" rows="15" class="<%=PageLang%>Font"></textarea>
				<input type="hidden" name="Type" value="Lyric" />
				<input type="submit" value="添加歌词" /> <input type="button" value="算了" />
			</form>
		</div>
	</div>
	<div class="Block5 Margin4">
		<!-- TemplateBeginEditable name="广告位：音乐 - 侧栏顶部" -->
		<ali:Ad Guid="{D2CA23DF-52CC-4982-A478-B4575F4E8D45}">
			<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad8.gif" alt="Ad" style="width:242px;height:60px" /></a>
		</ali:Ad>
		<!-- TemplateEndEditable -->
		
		<!-- TemplateBeginEditable name="点击排行" -->
		<h3>点击排行</h3>
		<ali:List Object="Music" Page="1" PageSize="10" Condition="IsDeleted=false and IsChecked=true" Sort="HitCount DESC">
			<ul class="List1">
				<ali:Record>
					<li><a href="<%=BuildUrl()%>" title="<%=Name%>" class="No<%=Index + 1%>"><%=Name%></a><span><%=HitCount%></span></li>
				</ali:Record>
			</ul>
		</ali:List>
		<div class="Bottom2"></div>
		<!-- TemplateEndEditable -->
		
		<!-- TemplateBeginEditable name="最新更新" -->
		<h3>最新更新</h3>
		<ali:List Object="Music" Page="1" PageSize="10" Condition="IsDeleted=false and IsChecked=true" Sort="UpdateTime DESC">
			<ul class="List4">
				<ali:Record>
					<li><a href="<%=BuildUrl()%>" title="<%=Name%>"><%=Name%></a><span><%=HitCount%></span></li>
				</ali:Record>
			</ul>
		</ali:List>
		<div class="Bottom2"></div>
		<!-- TemplateEndEditable -->

		<!-- TemplateBeginEditable name="广告位：音乐 - 侧栏底部" -->
		<h3></h3>
		<div class="Ad9">
			<ali:Ad Guid="{4E02B4CD-61B6-4372-9C5F-D9048CD9E62E}">
				<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad9.gif" alt="Ad" style="width:218px;height:168px" /></a>
			</ali:Ad>
		</div>
		<!-- TemplateEndEditable -->
	</div>
</div>

<!-- TemplateBeginEditable name="广告位：音乐 - 网页底部" -->
<div class="Wrap">
	<div class="Ad0">
		<ali:Ad Guid="{976244FE-967E-4def-A8B5-33687F8C2CEF}">
			<a href="http://www.alicms.cn"><img src="<%=ImagePath%>ad/ad100.jpg" alt="Ad" style="width:980px;height:70px" /></a>
		</ali:Ad>
	</div>
</div>
<!-- TemplateEndEditable -->

<!-- TemplateBeginEditable name="友情连接" -->
<ali:List Mark="System" Object="Link" Condition="IsChecked=true">
	<div class="Wrap">
		<div class="Link">
			<h1>友情链接</h1>
			<ul>
				<ali:Record>
					<li>
						<%If Convert.IsDBNull(Logo)%>
							<a href="<%=URL%>" target="_blank" title="<%=Name%>"><%=Name%></a>
						<%Else%>
							<a href="<%=URL%>" target="_blank" title="<%=Name%>"><img src="<%=Logo%>" alt="<%=Name%>" /></a>
						<%EndIf%>
					</li>
				</ali:Record>
			</ul>
		</div>
	</div>
</ali:List>
<!-- TemplateEndEditable -->

<div class="Wrap Footer">
	<!-- TemplateBeginEditable name="脚注菜单" -->
	<ali:Menu Condition="IsDisplay=true and CategoryID={BAC035A8-F6BB-4772-8D51-A7F4F3AB7AD3}">
		<ali:Record>
			<a href="<%=URL%>" target="<%=Target%>" title="<%=Name%>"<%=Style%>><%=Name%></a>
			<ali:Separator>|</ali:Separator>
		</ali:Record>
		<hr size="1" />
	</ali:Menu>
	<!-- TemplateEndEditable -->

	<%=Footer%>
</div>

<script type="text/javascript" src="<%=CommonPath%>jquery/core.js"></script>
<script type="text/javascript" src="<%=CommonPath%>jquery/ui.js"></script>
<script type="text/javascript" src="<%=CommonPath%>jquery/marquee.js"></script>
<script type="text/javascript" src="<%=CommonPath%>utility.js"></script>
<%If PageLang == "UYG" || PageLang == "KZA" || PageLang == "KGA"%>
	<script type="text/javascript" src="<%=CommonPath%>IlgharIme.js"></script>
<%EndIf%>
<script type="text/javascript" src="<%=Player16[CodeFile]%>"></script>
<script type="text/javascript" src="<%=Player21[CodeFile]%>"></script>
<script type="text/javascript" src="<%=JsPath%>lrc.js"></script>
<script type="text/javascript" src="<%=JsPath%>player.js"></script>
<script type="text/javascript" src="<%=JsPath%>common.js"></script>
<%=StatisticsCode%>
</body>
</html>
